﻿using System.Data.Entity.ModelConfiguration;
using ProjetoComperio.DataLayer.Entities;

namespace ProjetoComperio.DataLayer.Configuration
{
    public class ContributionConfiguration : EntityConfiguration<Contribution>
    {

        public ContributionConfiguration()
        {

            Property(c => c.ContributionID).IsIdentity();
            MapHierarchy(
                c => new
                {
                    c.ContributionID,
                    c.SourceInfo,
                    c.RegisterDate,
                    c.Title,
                    c.Description,
                    c.AcademicPersonID,
                    c.IsActive,
                }
                ).ToTable("Contribution");
        }
    }
}
